//
//	MCUserProfileModel.swift
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import ObjectMapper


class MCUserProfileModel : NSObject, NSCoding, Mappable{

	var avatar : String?
	var birthday : String?
	var memberExpireTime : String?
	var name : String?
	var phone : String?
	var realName : String?
	var registerType : Int?
	var sex : Int?
	var userType : Int?


	class func newInstance(map: Map) -> Mappable?{
		return MCUserProfileModel()
	}
	required init?(map: Map){}
	private override init(){}

	func mapping(map: Map)
	{
		avatar <- map["avatar"]
		birthday <- map["birthday"]
		memberExpireTime <- map["memberExpireTime"]
		name <- map["name"]
		phone <- map["phone"]
		realName <- map["realName"]
		registerType <- map["registerType"]
		sex <- map["sex"]
		userType <- map["userType"]
		
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         avatar = aDecoder.decodeObject(forKey: "avatar") as? String
         birthday = aDecoder.decodeObject(forKey: "birthday") as? String
         memberExpireTime = aDecoder.decodeObject(forKey: "memberExpireTime") as? String
         name = aDecoder.decodeObject(forKey: "name") as? String
         phone = aDecoder.decodeObject(forKey: "phone") as? String
         realName = aDecoder.decodeObject(forKey: "realName") as? String
         registerType = aDecoder.decodeObject(forKey: "registerType") as? Int
         sex = aDecoder.decodeObject(forKey: "sex") as? Int
         userType = aDecoder.decodeObject(forKey: "userType") as? Int

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if avatar != nil{
			aCoder.encode(avatar, forKey: "avatar")
		}
		if birthday != nil{
			aCoder.encode(birthday, forKey: "birthday")
		}
		if memberExpireTime != nil{
			aCoder.encode(memberExpireTime, forKey: "memberExpireTime")
		}
		if name != nil{
			aCoder.encode(name, forKey: "name")
		}
		if phone != nil{
			aCoder.encode(phone, forKey: "phone")
		}
		if realName != nil{
			aCoder.encode(realName, forKey: "realName")
		}
		if registerType != nil{
			aCoder.encode(registerType, forKey: "registerType")
		}
		if sex != nil{
			aCoder.encode(sex, forKey: "sex")
		}
		if userType != nil{
			aCoder.encode(userType, forKey: "userType")
		}

	}

}